import service from "@/utils/request";

// 获取竞赛列表
export function getExamListService(params = {}) {
  return service({
    url: "/exam/semiLogin/list",
    method: "get",
    params,
  });
}

// 报名参加竞赛
export function enterExamService(examId) {
  return service({
    url: `/exam/enter/${examId}`,
    method: "post",
  });
}

// 获取竞赛排名
export function getExamRankService(params = {}) {
  return service({
    url: "/exam/rank",
    method: "get",
    params,
  });
}

// 获取竞赛排名列表
export function getExamRankListService(params = {}) {
  return service({
    url: "/exam/rankList",
    method: "get",
    params,
  });
}

// 获取竞赛详情
export function getExamDetailService(examId) {
  return service({
    url: `/exam/detail/${examId}`,
    method: "get",
  });
}
